package test.aop.service;

import com.why.simpleboot.core.annotation.ioc.Autowired;
import com.why.simpleboot.core.annotation.mvc.GetMapping;
import com.why.simpleboot.core.annotation.mvc.RestController;

import java.util.UUID;

/**
 * @program: why-simpleboot-framework
 * @description:
 * @author: @why
 * @create: 2021-05-27 07:47
 **/
@RestController("aop")
public class AopController {
    @Autowired
    A a;
//    @Autowired
//    B b;
//
//    @Autowired
//    StudentService studentService;


    @GetMapping("/ti/jdk")
    public String testInterceptorAndJdk() {
        a.helloWorld();
        //测试拦截toString方法是否成功
        System.out.println(a);
        return UUID.randomUUID().toString();
    }

    @GetMapping("/ti/cglib")
    public String testInterceptorAndCglib() {
//        b.helloWorld();
        //测试拦截toString方法是否成功
//        System.out.println(b);
        return UUID.randomUUID().toString();
    }


    @GetMapping("/aspect")
    public String testAscept() {
//        studentService.getSummary("1");
        return UUID.randomUUID().toString();
    }


    @GetMapping("/glo")
    public String tesGlo() {
        return UUID.randomUUID().toString();
    }


}
